//
//  LocationViewController.h
//  Kokozu
//
//  Created by Bismarrck on 11-7-12.
//  Copyright 2011年 Tsinghua University. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "SectionHeaderView.h"
#import "SectionInfo.h"

typedef enum {
    
    PICKER_CITY,
    PICKER_DIST
    
} SheetType;

@protocol LocationViewChangeDelegate;

@interface LocationViewController : UITableViewController 
    <SectionHeaderViewDelegate, UIActionSheetDelegate, UIPickerViewDelegate, UIPickerViewDataSource>
{
    UIPickerView *dataPicker_;
    SheetType picker_type_;
    UIActionSheet *actionSheet_;
    id <LocationViewChangeDelegate> delegate;
    
    NSIndexPath *lastIndexPath;
    NSString *myCity_;
    NSString *myDist_;
    NSString *myCommCircle_;
    NSString *myCommArea_;
}

@property (nonatomic, retain) NSArray *commCircles;
@property (nonatomic, retain) id <LocationViewChangeDelegate> delegate;
@property (nonatomic, retain) NSIndexPath *lastIndexPath;
@property (nonatomic, retain) UIPickerView *dataPicker;
@property (nonatomic, retain) UIActionSheet *actionSheet;

- (id)initWithStyle:(UITableViewStyle)style delegate:(id <LocationViewChangeDelegate>)aDelegate commCirles:(NSArray *)circles;

@end

@protocol LocationViewChangeDelegate

- (void)commAreaDidChanged;

@end
